package Bk.Expression;

public class Retangle {

	public static void main(String[] args) {
		Retangle11 r = new Retangle11();
		r = new Retangle11(4,40,"white");
		System.out.println(r.toString());
		System.out.println(r.getArea());
		System.out.println(r.getCircum());
		
		
		
		
		

	}//main

}//class
interface RetangleService{
	double getArea();
	double getCircum();
	
}


class Retangle11 implements RetangleService{
	private double width;
	private double height;
    private String color;
    
    public Retangle11() {}

	public Retangle11(double width, double height, String color) {
		super();
		this.width = width;
		this.height = height;
		this.color = color;
	}

	public double getWidth() {
		return width;
	}

	public void setWidth(double width) {
		this.width = width;
	}

	public double getHeight() {
		return height;
	}

	public void setHeight(double height) {
		this.height = height;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	@Override
	public String toString() {
		return "Retangle11 [width=" + width + ", height=" + height + ", color="
				+ color + "]";
	}

	@Override
	public double getArea() {
		double area = getWidth()*getHeight();
		return area;
//		return getWidth()*getHeight();
		
	}

	@Override
	public double getCircum() {
		double circum = getWidth()*2+getHeight()*2;
		return circum;
	}
    
}





















